package com.example.admin.androidtest.threadpool;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * Created by admin on 2017/12/25.
 */

public class ThreadPoolTest {
    public static void main(String[] agrs) throws ExecutionException, InterruptedException {
        System.out.println("thread:" + Thread.currentThread().getName());
        //参数map
        Map<String, String> map = new HashMap<>();
        map.put("menu", "秘制红烧肉");
        map.put("key", "************************");
        //接口url
        String url = "http://apis.juhe.cn/cook/query.php";
        //
        System.out.println("begin");
        NetWorkUtil.get(map, url, new NetWorkUtil.Callback() {
            @Override
            public void onCallback(String result) {
                System.out.println(result);
            }
        });
        //
        System.out.println("hello");
        System.out.println("hello");
        System.out.println("hello");
        System.out.println("hello");
    }

}
